package com.qx.controller;

import com.qx.Mapper.generalmapper;
import com.qx.pojo.General;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class generalcontroller {
    @Autowired
    private generalmapper generalmapper;
    @RequestMapping("/iwell")
    public String  genner(Model model){
        List<General> generals=generalmapper.genner();
        model.addAttribute("emps",generals);
        return "templates/iwell.html";
    }

}
